<div class="leftnews" >
    <div class="bgtitle_news">
        <div class="title_news1_r"></div>
        <div class="title_news1">
            <h2><a href="javascript:void(0);">[Giới thiệu]</a></h2>
        </div>

    </div>
    <div class="leftnews_line">
        <ul>
            <?php
            $IntroList = get_all_intro();
            $totalIntro = $db->num_rows($IntroList);
            $i=0;


            while($rs=$db->fetch_array($IntroList)) {
                if($rs['title_link']==$param[1]) {
                    if($i==($totalIntro-1)) {
                        echo "<li class='last_current'><a href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }else {
                        echo "<li><a class='current_cat' href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }
                 } elseif($param[1]=='') {

                    if($i==($totalIntro-1)) {
                        echo "<li class='last'><a href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }elseif($i==0) {
                        echo "<li><a class='current_cat' href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }else {
                        echo "<li><a  href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }                
                } else {
                    if($i==($totalIntro-1)) {
                        echo "<li class='last'><a href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }else {
                        echo "<li><a  href='".get_link("intro","detail",$rs['title_link'])."' title='".htmlentities_utf8($rs['title'])."'>".$rs['title']."</a></li>";
                    }
                }

                $i++;
            }

            ?>
        </ul>
    </div>

    <div class="bgtitle_news">
         <div class="title_news1_r"></div>
        <div class="title_news1">
            <h2><a href="javascript:void(0);">[Dự án quan tâm]</a></h2>
        </div>

    </div>
    <div class="left_news2">
          <?php $rsFocus=getProject_orderByView();?>
             <div class="left_project">
                <ul>
                <?php
                while($rs=$db->fetch_array($rsFocus)) {
                    ?>
                    <li style="margin-top: 10px;margin-bottom: 10px">
                    <table cellpadding="0px" cellspacing="0px" border="0px" width="97%" >
                        <tr>
                            <td style="width:20%">
                                <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb"><img width="47px" height="47px" src="<?php echo get_project_thumb($rs['thumb'],'47-47');?>" /></a>
                            </td>
                            <td style="width:70%"><a <a href="<?php echo get_link("projects","detail",$rs['title_link']); ?>" class="thumb">
                            <b><?php echo $rs["title"]?></b></a></td>
                        </tr>
                    </table>
                </li>
                    <?php
                }
                ?>
                </ul>
             </div>
    </div>
    <?php
        $rsAdv = getAdvClient('intro', 'left', 5);
        if($db->num_rows($rsAdv)){
    ?>
    <div class="bgtitle_news">
         <div class="title_news1_r"></div>
        <div class="title_news1">
            <h2><a href="javascript:void(0);">[Quảng cáo]</a></h2>
        </div>

    </div>
    <div class="left_news2" >
        <div class="left_project" >
            <?php
            while ($row = $db->fetch_array($rsAdv)) {
                ?>
            <div style="padding: 2px;">
                <a href="<?php echo $row['link'];?>"><img alt="" src="<?php echo $row['filename'];?>" width="180px;"/></a>
            </div>
            <?php }?>
        
        </div>
    </div>
    <?php }?>

</div>